package dao.impl;

import dao.IScheduleDao;
import entity.Schedule;
import util.FileUtil;
import java.util.List;

public class ScheduleDaoImpl implements IScheduleDao {
    private static final String FILE = "schedules.dat";

    @Override
    public void save(List<Schedule> schedules) {
        FileUtil.writeList(schedules, FILE);
    }

    @Override
    public List<Schedule> load() {
        return FileUtil.readList(FILE);
    }
}